#ifndef APPS_ATOM_DEFS_H
#define APPS_ATOM_DEFS_H

#include "apps/i18n.h"

enum AtomType : uint8_t {
  UNKNOWN = 0,
  ALKALI_METAL = 1,
  ALKALI_EARTH_METAL = 2,
  LANTHANIDE = 3,
  ACTINIDE = 4,
  TRANSITION_METAL = 5,
  POST_TRANSITION_METAL = 6,
  METALLOID = 7,
  HALOGEN = 8,
  REACTIVE_NONMETAL = 9,
  NOBLE_GAS = 10
};

const I18n::Message AtomicI18nForType[] {
  I18n::Message::AtomTypeUNKNOWN,
  I18n::Message::AtomTypeALKALIMETAL,
  I18n::Message::AtomTypeALKALIEARTHMETAL,
  I18n::Message::AtomTypeLANTHANIDE,
  I18n::Message::AtomTypeACTINIDE,
  I18n::Message::AtomTypeTRANSITIONMETAL,
  I18n::Message::AtomTypePOSTTRANSITIONMETAL,
  I18n::Message::AtomTypeMETALLOID,
  I18n::Message::AtomTypeHALLOGEN,
  I18n::Message::AtomTypeREACTIVENONMETAL,
  I18n::Message::AtomTypeNOBLEGAS
};

struct AtomDef {
  uint8_t num;
  uint8_t x;
  uint8_t y;
  AtomType type;
  I18n::Message name;
  const char* symbol;
  uint8_t neutrons;
  double mass;
  double electroneg;
  double ionisation;
};

const AtomDef atomsdefs[] = {
    {1,0,0,REACTIVE_NONMETAL,I18n::Message::AtomName_Hydrogen,"H",0,1.007975,2.2,1312},
    {2,17,0,NOBLE_GAS,I18n::Message::AtomName_Helium,"He",2,4.002602,-1,2372.3},
    {3,0,1,ALKALI_METAL,I18n::Message::AtomName_Lithium,"Li",4,6.9395,0.98,520.2},
    {4,1,1,ALKALI_EARTH_METAL,I18n::Message::AtomName_Beryllium,"Be",5,9.0121831,1.57,899.5},
    {5,12,1,METALLOID,I18n::Message::AtomName_Boron,"B",6,10.8135,2.04,800.6},
    {6,13,1,REACTIVE_NONMETAL,I18n::Message::AtomName_Carbon,"C",6,12.0106,2.55,1086.5},
    {7,14,1,REACTIVE_NONMETAL,I18n::Message::AtomName_Nitrogen,"N",7,14.006855,3.04,1402.3},
    {8,15,1,REACTIVE_NONMETAL,I18n::Message::AtomName_Oxygen,"O",8,15.9994,3.44,1313.9},
    {9,16,1,HALOGEN,I18n::Message::AtomName_Fluorine,"F",10,18.99840316,3.98,1681},
    {10,17,1,NOBLE_GAS,I18n::Message::AtomName_Neon,"Ne",10,20.1797,-1,2080.7},
    {11,0,2,ALKALI_METAL,I18n::Message::AtomName_Sodium,"Na",12,22.98976928,0.93,495.8},
    {12,1,2,ALKALI_EARTH_METAL,I18n::Message::AtomName_Magnesium,"Mg",12,24.3055,1.31,737.7},
    {13,12,2,POST_TRANSITION_METAL,I18n::Message::AtomName_Aluminium,"Al",14,26.9815385,1.61,577.5},
    {14,13,2,METALLOID,I18n::Message::AtomName_Silicon,"Si",14,28.085,1.9,786.5},
    {15,14,2,REACTIVE_NONMETAL,I18n::Message::AtomName_Phosphorus,"P",16,30.973762,2.19,1011.8},
    {16,15,2,REACTIVE_NONMETAL,I18n::Message::AtomName_Sulfur,"S",16,32.0675,2.58,999.6},
    {17,16,2,HALOGEN,I18n::Message::AtomName_Chlorine,"Cl",18,35.4515,3.16,1251.2},
    {18,17,2,NOBLE_GAS,I18n::Message::AtomName_Argon,"Ar",22,39.948,-1,1520.6},
    {19,0,3,ALKALI_METAL,I18n::Message::AtomName_Potassium,"K",20,39.0983,0.82,418.8},
    {20,1,3,ALKALI_EARTH_METAL,I18n::Message::AtomName_Calcium,"Ca",20,40.078,1,589.8},
    {21,2,3,TRANSITION_METAL,I18n::Message::AtomName_Scandium,"Sc",24,44.955908,1.36,633.1},
    {22,3,3,TRANSITION_METAL,I18n::Message::AtomName_Titanium,"Ti",26,47.867,1.54,658.8},
    {23,4,3,TRANSITION_METAL,I18n::Message::AtomName_Vanadium,"V",28,50.9415,1.63,650.9},
    {24,5,3,TRANSITION_METAL,I18n::Message::AtomName_Chromium,"Cr",28,51.9961,1.66,652.9},
    {25,6,3,TRANSITION_METAL,I18n::Message::AtomName_Manganese,"Mn",30,54.938044,1.55,717.3},
    {26,7,3,TRANSITION_METAL,I18n::Message::AtomName_Iron,"Fe",30,55.845,1.83,762.5},
    {27,8,3,TRANSITION_METAL,I18n::Message::AtomName_Cobalt,"Co",32,58.933194,1.91,760.4},
    {28,9,3,TRANSITION_METAL,I18n::Message::AtomName_Nickel,"Ni",31,58.6934,1.88,737.1},
    {29,10,3,TRANSITION_METAL,I18n::Message::AtomName_Copper,"Cu",34,63.546,1.9,745.5},
    {30,11,3,POST_TRANSITION_METAL,I18n::Message::AtomName_Zinc,"Zn",34,65.38,1.65,906.4},
    {31,12,3,POST_TRANSITION_METAL,I18n::Message::AtomName_Gallium,"Ga",38,69.723,1.81,578.8},
    {32,13,3,METALLOID,I18n::Message::AtomName_Germanium,"Ge",42,72.63,2.01,762},
    {33,14,3,METALLOID,I18n::Message::AtomName_Arsenic,"As",42,74.921595,2.18,947},
    {34,15,3,REACTIVE_NONMETAL,I18n::Message::AtomName_Selenium,"Se",46,78.971,2.55,941},
    {35,16,3,HALOGEN,I18n::Message::AtomName_Bromine,"Br",44,79.904,2.96,1139.9},
    {36,17,3,NOBLE_GAS,I18n::Message::AtomName_Krypton,"Kr",48,83.798,3,1350.8},
    {37,0,4,ALKALI_METAL,I18n::Message::AtomName_Rubidium,"Rb",48,85.4678,0.82,403},
    {38,1,4,ALKALI_EARTH_METAL,I18n::Message::AtomName_Strontium,"Sr",50,87.62,0.95,549.5},
    {39,2,4,TRANSITION_METAL,I18n::Message::AtomName_Yttrium,"Y",50,88.90584,1.22,600},
    {40,3,4,TRANSITION_METAL,I18n::Message::AtomName_Zirconium,"Zr",50,91.224,1.33,640.1},
    {41,4,4,TRANSITION_METAL,I18n::Message::AtomName_Niobium,"Nb",52,92.90637,1.6,652.1},
    {42,5,4,TRANSITION_METAL,I18n::Message::AtomName_Molybdenum,"Mo",56,95.95,2.16,684.3},
    {43,6,4,TRANSITION_METAL,I18n::Message::AtomName_Technetium,"Tc",56,98,1.9,702},
    {44,7,4,TRANSITION_METAL,I18n::Message::AtomName_Ruthemium,"Ru",58,101.07,2.2,710.2},
    {45,8,4,TRANSITION_METAL,I18n::Message::AtomName_Rhodium,"Rh",58,102.9055,2.28,719.7},
    {46,9,4,TRANSITION_METAL,I18n::Message::AtomName_Palladium,"Pd",60,106.42,2.2,804.4},
    {47,10,4,TRANSITION_METAL,I18n::Message::AtomName_Silver,"Ag",60,107.8682,1.93,731},
    {48,11,4,POST_TRANSITION_METAL,I18n::Message::AtomName_Cadmium,"Cd",66,112.414,1.69,867.8},
    {49,12,4,POST_TRANSITION_METAL,I18n::Message::AtomName_Indium,"In",66,114.818,1.78,558.3},
    {50,13,4,POST_TRANSITION_METAL,I18n::Message::AtomName_Tin,"Sn",70,118.71,1.96,708.6},
    {51,14,4,METALLOID,I18n::Message::AtomName_Antimony,"Sb",70,121.76,2.05,834},
    {52,15,4,METALLOID,I18n::Message::AtomName_Tellurium,"Te",78,127.6,2.1,869.3},
    {53,16,4,HALOGEN,I18n::Message::AtomName_Indine,"I",74,126.90447,2.66,1008.4},
    {54,17,4,NOBLE_GAS,I18n::Message::AtomName_Xenon,"Xe",78,131.293,2.6,1170.4},
    {55,0,5,ALKALI_METAL,I18n::Message::AtomName_Caesium,"Cs",78,132.905452,0.79,375.7},
    {56,1,5,ALKALI_EARTH_METAL,I18n::Message::AtomName_Barium,"Ba",81,137.327,0.89,502.9},
    {57,3,8,LANTHANIDE,I18n::Message::AtomName_Lanthanum,"La",82,138.90547,1.1,538.1},
    {58,4,8,LANTHANIDE,I18n::Message::AtomName_Cerium,"Ce",82,140.116,1.12,534.4},
    {59,5,8,LANTHANIDE,I18n::Message::AtomName_Praseodymium,"Pr",82,140.90766,1.13,527},
    {60,6,8,LANTHANIDE,I18n::Message::AtomName_Neodymium,"Nd",84,144.242,1.14,533.1},
    {61,7,8,LANTHANIDE,I18n::Message::AtomName_Promethium,"Pm",84,145,-1,540},
    {62,8,8,LANTHANIDE,I18n::Message::AtomName_Samarium,"Sm",88,150.36,1.17,544.5},
    {63,9,8,LANTHANIDE,I18n::Message::AtomName_Europium,"Eu",89,151.964,-1,547.1},
    {64,10,8,LANTHANIDE,I18n::Message::AtomName_Gadolinium,"Gd",93,157.25,1.2,593.4},
    {65,11,8,LANTHANIDE,I18n::Message::AtomName_Terbium,"Tb",94,158.92535,-1,565.8},
    {66,12,8,LANTHANIDE,I18n::Message::AtomName_Dyxprosium,"Dy",97,162.5,1.22,573},
    {67,13,8,LANTHANIDE,I18n::Message::AtomName_Holmium,"Ho",98,164.93033,1.23,581},
    {68,14,8,LANTHANIDE,I18n::Message::AtomName_Erbium,"Er",99,167.259,1.24,589.3},
    {69,15,8,LANTHANIDE,I18n::Message::AtomName_Thulium,"Tm",100,168.93422,1.25,596.7},
    {70,16,8,LANTHANIDE,I18n::Message::AtomName_Ytterbium,"Yb",103,173.045,-1,603.4},
    {71,17,8,LANTHANIDE,I18n::Message::AtomName_Lutetium,"Lu",104,174.9668,1.27,523.5},
    {72,3,5,TRANSITION_METAL,I18n::Message::AtomName_Hafnium,"Hf",106,178.49,1.3,658.5},
    {73,4,5,TRANSITION_METAL,I18n::Message::AtomName_Tantalum,"Ta",108,180.94788,1.5,761},
    {74,5,5,TRANSITION_METAL,I18n::Message::AtomName_Tungsten,"W",110,183.84,2.36,770},
    {75,6,5,TRANSITION_METAL,I18n::Message::AtomName_Rhenium,"Re",111,186.207,1.9,760},
    {76,7,5,TRANSITION_METAL,I18n::Message::AtomName_Osmium,"Os",114,190.23,2.2,840},
    {77,8,5,TRANSITION_METAL,I18n::Message::AtomName_Iridium,"Ir",115,192.217,2.2,880},
    {78,9,5,TRANSITION_METAL,I18n::Message::AtomName_Platinum,"Pt",117,195.084,2.28,870},
    {79,10,5,TRANSITION_METAL,I18n::Message::AtomName_Gold,"Au",118,196.966569,2.54,890.1},
    {80,11,5,POST_TRANSITION_METAL,I18n::Message::AtomName_Mercury,"Hg",121,200.592,2,1007.1},
    {81,12,5,POST_TRANSITION_METAL,I18n::Message::AtomName_Thalium,"Tl",123,204.3835,1.62,589.4},
    {82,13,5,POST_TRANSITION_METAL,I18n::Message::AtomName_Lead,"Pb",125,207.2,2.33,715.6},
    {83,14,5,POST_TRANSITION_METAL,I18n::Message::AtomName_Bismuth,"Bi",126,208.9804,2.02,703},
    {84,15,5,POST_TRANSITION_METAL,I18n::Message::AtomName_Polonium,"Po",125,209,2,812.1},
    {85,16,5,HALOGEN,I18n::Message::AtomName_Astatine,"At",125,210,2.2,890},
    {86,17,5,NOBLE_GAS,I18n::Message::AtomName_Radon,"Rn",136,222,-1,1037},
    {87,0,6,ALKALI_METAL,I18n::Message::AtomName_Francium,"Fr",136,223,0.7,380},
    {88,1,6,ALKALI_EARTH_METAL,I18n::Message::AtomName_Radium,"Ra",138,226,0.9,509.3},
    {89,3,9,ACTINIDE,I18n::Message::AtomName_Actinium,"Ac",138,227,1.1,499},
    {90,4,9,ACTINIDE,I18n::Message::AtomName_Thorium,"Th",142,232.0377,1.3,587},
    {91,5,9,ACTINIDE,I18n::Message::AtomName_Protactinium,"Pa",140,231.03588,1.5,568},
    {92,6,9,ACTINIDE,I18n::Message::AtomName_Uranium,"U",146,238.02891,1.38,597.6},
    {93,7,9,ACTINIDE,I18n::Message::AtomName_Neptunium,"Np",144,237,1.36,604.5},
    {94,8,9,ACTINIDE,I18n::Message::AtomName_Plutonium,"Pu",150,244,1.28,584.7},
    {95,9,9,ACTINIDE,I18n::Message::AtomName_Americium,"Am",146,243,1.3,578},
    {96,10,9,ACTINIDE,I18n::Message::AtomName_Curium,"Cm",151,247,1.3,581},
    {97,11,9,ACTINIDE,I18n::Message::AtomName_Berkelium,"Bk",150,247,1.3,601},
    {98,12,9,ACTINIDE,I18n::Message::AtomName_Californium,"Cf",153,251,1.3,608},
    {99,13,9,ACTINIDE,I18n::Message::AtomName_Einsteinium,"Es",153,252,1.3,619},
    {100,14,9,ACTINIDE,I18n::Message::AtomName_Fermium,"Fm",157,257,1.3,627},
    {101,15,9,ACTINIDE,I18n::Message::AtomName_Mendelevium,"Md",157,258,1.3,635},
    {102,16,9,ACTINIDE,I18n::Message::AtomName_Nobelium,"No",157,259,1.3,642},
    {103,17,9,ACTINIDE,I18n::Message::AtomName_Lawrencium,"Lr",163,266,-1,470},
    {104,3,6,TRANSITION_METAL,I18n::Message::AtomName_Rutherfordium,"Rf",163,267,-1,580},
    {105,4,6,TRANSITION_METAL,I18n::Message::AtomName_Dubnium,"Db",163,268,-1,-1},
    {106,5,6,TRANSITION_METAL,I18n::Message::AtomName_Seaborgium,"Sg",163,269,-1,-1},
    {107,6,6,TRANSITION_METAL,I18n::Message::AtomName_Bohrium,"Bh",163,270,-1,-1},
    {108,7,6,TRANSITION_METAL,I18n::Message::AtomName_Hassium,"Hs",169,277,-1,-1},
    {109,8,6,UNKNOWN,I18n::Message::AtomName_Meitnerium,"Mt",169,278,-1,-1},
    {110,9,6,UNKNOWN,I18n::Message::AtomName_Darmstadtium,"Ds",171,281,-1,-1},
    {111,10,6,UNKNOWN,I18n::Message::AtomName_Roentgenium,"Rg",171,282,-1,-1},
    {112,11,6,POST_TRANSITION_METAL,I18n::Message::AtomName_Copernicium,"Cn",173,285,-1,-1},
    {113,12,6,UNKNOWN,I18n::Message::AtomName_Nihonium,"Nh",173,286,-1,-1},
    {114,13,6,UNKNOWN,I18n::Message::AtomName_Flerovium,"Fl",175,289,-1,-1},
    {115,14,6,UNKNOWN,I18n::Message::AtomName_Moscovium,"Mc",174,289,-1,-1},
    {116,15,6,UNKNOWN,I18n::Message::AtomName_Livermorium,"Lv",177,293,-1,-1},
    {117,16,6,UNKNOWN,I18n::Message::AtomName_Tennessine,"Ts",177,294,-1,-1},
    {118,17,6,NOBLE_GAS,I18n::Message::AtomName_Oganesson,"Og",176,294,-1,-1}
};

#endif
